package experiment;

import itemMining.FullyCorrelatedItem;

import java.util.HashMap;
import java.util.Hashtable;
import java.util.Map.Entry;

public class Dimension {

	public HashMap<String, HashMap<Long, Double>> value2obj = new HashMap();
	public boolean xor = true;
	public double weight = 1.0;

	public void generateBIU() {
		if (!xor) {
			// ---- create object to value map -----
			HashMap<Long, HashMap<String, Double>> obj2value = new HashMap();
			for (Entry<String, HashMap<Long, Double>> e : value2obj.entrySet()) {
				for (Entry<Long, Double> entry : e.getValue().entrySet()) {
					HashMap<String, Double> map = obj2value.get(entry.getKey());
					if (map == null) {
						map = new HashMap<String, Double>();
						obj2value.put(entry.getKey(), map);
					}
					map.put(e.getKey(), entry.getValue());
				}
			}
			new FullyCorrelatedItem().convertDim(value2obj, obj2value.size(), Parameter.corrThresh);
		}
	}

}
